$(function () {

/*装载个人信息的异步*/
    var uname = $("#uname");

    var myname1 = $("#uName1");
    var myname2 = $("#uName2");
    var usex = $("#usex");
    var uage = $("#uage");
    var uphone = $("#uphone");
    var uemail = $("#uemail");
    var uaddress = $("#uaddress");
    var uplace = $("#uplace");

    $.ajax({
        url:'userinfoAll',
        type:'get',
        contentType:"application/json;charset=utf-8",
        dataType:'json',
        success:function (data) {
            uname.text(data.uName);
            myname1.text(data.uName);
            myname2.text(data.uName);
            usex.text(data.uGender);
            uage.text(data.uAge);
            uphone.text(data.uPhone);
            uemail.text(data.uEmail);
            uaddress.text(data.uAddress);
            uplace.text(data.uPlace);


        }
    })

/*装载个人技能的异步*/
    var bigDiv = $("#bigDiv")
    bigDiv.append('<h4 class="title" id="h4">')
    $("#h4").text("专业技能123");

    let list = new Array();

   // $(".dial")[0].setAttribute('value','13');
   // $(".dial")[0].setAttribute('data-fgColor','#ff5e7e');
   // $(".dial")[0].value("12")
    //alert($(".count-box").length);
   // $(".count-text")[0].setAttribute('data-stop','13');
    //$(".count-text")[0].innerText=$(".count-text")[0].attr("data-stop");
//$(".spname")[0].innerHTML="hahahahah"
    $.ajax({
        url:'respecialityAll',
        type:'get',
        cache:false,
        contentType:"application/json;charset=utf-8",
        dataType:'json',
        success:function (data) {


            for(var i=0;i<data.length;i++){
                list.push(data[i].spFgcolor)
              //  alert(1111)
             //   $(".dial")[i].setAttribute('value',data[i].spValue);
                //console.log(i+"...."+data[i].spValue)
              //  $(".count-text")[i].setAttribute('data-stop',data[i].spValue2);
               // $(".spname")[i].innerHTML=data[i].spName
                $(".dial").eq(i).attr("value",data[i].spValue)
              //  alert($(".dial").eq(i).attr("class"))
              //  $(".dial").eq(i).attr('data-fgColor',data[i].spFgcolor);
                $(".count-text").eq(i).attr('data-stop',data[i].spValue2);
                $(".count-text").eq(i).text(data[i].spValue);
                $(".spname")[i].innerHTML=data[i].spName
                //console.log(i+"...."+data[i].spValue)
                /*alert(data[i].spId);
                alert(data[i].spName);
                alert(data[i].spName);
                alert(data[i].spFgcolor);
                alert(data[i].spValue);
                alert(data[i].spValue2);*/
            }
            for (var i=0;i<list.length;i++) {
                $(".dial")[i].setAttribute('data-fgColor',list[i]);

                console.log(list[i])
            }

        }

    })

})